<?php
/**
 * Arrow access group class
 * 
 * @version 1.0
 * @license  GNU GPL
 * @author Artur Kmera <artur.kmera@arrowplatform.org> 
 */
class ArrowAccessGroup implements IIdentificable {
	
	private $name;
	private $id;
	private $beans;
	private $templates;
	
	/**
	 * Constructor
	 * 
	 * @param $id
	 * @param $name
	 * @param $members array with bean and template members ( [ "beans" => array(), "templates" => array() ] )
	 * @return unknown_type
	 */
	public function __construct( $id, $name, $members ){
		$this->id = $id;
		$this->name =  $name;
		$this->beans = $members["beans"];
		$this->templates = $members["templates"];
			
	}
	
	public static function getModel() {
		return "access.ArrowAccessGroup" ;
	}
	
	public function getUniqueId() {
		return array( "model" => self::getModel(), "key" => $this->getId() ) ;
		
	}
	
	/**
	 * (non-PHPdoc)
	 * @see standardModels/org/arrowplatform/engine/IProjectHandlers/IUniqueObject#getKey()
	 */
	public function getKey(){
		return $this->getId();
	}
	
	/**
	 * Getter for group id
	 * 
	 * @return string
	 */
	public function getId(){
		return $this->id;
	}
	
	/**
	 * Getter for group name
	 * 
	 * @return string
	 */
	public function getName(){
		return $this->name;
	}
	
	/**
	 * Getter for template members
	 * 
	 * @return TemplateDescriptor[]
	 */
	public function getTemplates(){
		return $this->templates;
	}
	
	/**
	 * Getter for bean members
	 * 
	 * @return BeanDescriptor[]
	 */
	public function getBeans(){
		return $this->beans;
	}
	
}
?>